#!/bin/bash

# 2022-06-07: 100% BOGUS+USELESS with MongoDB 4+ -- SEE mongodb.service & #3236

if [ -f {{ mongodb_db_lock_file }} ]; then
    echo '"mongod --repair" cannot run when {{ mongodb_db_lock_file }} present.' >&2    # Output to STDERR but keep going, so /etc/systems/system/mongodb.service continues
else
    /usr/bin/mongod --repair --dbpath {{ mongodb_db_path }}
fi
